/**
 * Created by ritamashin on 2017/11/14.
 */
import React, {PureComponent} from 'react'
import {StyleSheet, View, Image, TouchableOpacity, Text} from 'react-native'
import flattenStyle from 'flattenStyle'
import {COLOR} from '../../config'

export default class ImageButton extends PureComponent{

    render(){
        let{onPress, textStyle,containerStyle, text, selectedImage, normalImage} = this.props;
        let selectedImage = selectedImage ? selectedImage : normalImage;
        let {fontSize} = flattenStyle(textStyle || styles.text);
        return (

            <View>
                {/*<TouchableOpacity*/}
                {/*onPress={onPress}*/}
                {/*style={[styles.container, {padding: Math.round(fontSize / 2)},*/}
                {/*containerStyle]}*/}
                {/*>*/}
                {/*<Image source={selectedImage ? selectedImage : normalImage}/>*/}
                {/*<Text style={[styles.text, textStyle]}>{text}</Text>*/}
                {/*</TouchableOpacity>*/}
            </View>

            //<View/>
        )
    }
}


export default ({text, onPress, containerStyle, textStyle,}) => {

}
const styles = StyleSheet.create({
    container: {
        margin: 10,
        padding: 10,
        justifyContent: 'center',
        alignItems: 'center',
        borderWidth: 1,
        borderColor: COLOR.themeRedColor,
        borderRadius: 5
    },
    text: {
        color: COLOR.themeRedColor,
        fontSize: 14
    }
})